﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Shared/OneColumn.Master" AutoEventWireup="true"
    CodeBehind="Avatar.aspx.cs" Inherits="SharingCenter.Web.User.CurrentProfile.Avatar" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitlePlaceHolder" runat="server">
    头像设置
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="head" runat="server">
    <link href="../../Content/imgareaselect-default.css" rel="stylesheet" type="text/css" />
    <%-- <link href="../../Content/usersettings.css" rel="stylesheet" type="text/css" />
    <link href="../../Content/jquery.lightbox-0.5.css" rel="stylesheet" type="text/css" />--%>
    <style type="text/css">
        .previewbox
        {
            height: 150px;
            width: 150px;
            overflow: hidden;
            position: relative;
            border:1px solid gray;
        }
        .previewbox img
        {
            position: absolute;
            top: 0;
        }
    </style>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="MainContentPlaceHolder" runat="server">
    <asp:ScriptManagerProxy ID="ScriptManagerProxy1" runat="server">
        <Scripts>
            <asp:ScriptReference Path="~/Scripts/jquery.imgareaselect.pack.js" />
            <asp:ScriptReference Path="~/Scripts/jquery.guid.js" />
            <asp:ScriptReference Path="~/Scripts/jquery.lightbox-0.5.pack.js" />
            <asp:ScriptReference Path="Avatar.js" />
            <%--<asp:ScriptReference Path="~/Scripts/jquery.dropshadow.js" />--%>
        </Scripts>
    </asp:ScriptManagerProxy>
    <myuc:GenericTabs runat="server" Section="Settings" SelectedItem="avatar" />
    <h2 class="bb">
        <img src="../../Content/images/icons/elite_1616.png" alt="" />
        头像设置
    </h2>
    <div class="avatarsetting fc">
        <myuc:MessageBox ID="MessageBox1" runat="server" Text="如果您还没有设置自己的头像，系统会显示为默认头像，您需要自己上传一张新照片来作为自己的个人头像。" />
        <div class="left ctn3">
            <div>
                <h2>
                    我当前的头像</h2>
                <div class="avatarbox left previewbox">
                    <cc:AvatarImage AddHash="true" CssClass="previewimg" ID="AvatarImage1" runat="server" AvatarType="Normal" AlternateText="" />
                </div>
            </div>
        </div>
        <div class="left">
            <div>
                <h2>
                    <img src="../../Content/images/icons/up_16.png" alt="" />
                    上传新的头像</h2>
                <div class="ctn-p-b">
                   <%-- <a href="#" onclick="PopupFileUpload()">选择图片</a>--%>
                    <ajaxctrltool:AsyncFileUpload ID="AsyncFileUpload1" runat="server" OnClientUploadComplete="FileUploadComplete"
                        OnClientUploadStarted="FileUploadStarted" OnClientUploadError="FileUploadError"
                        ThrobberID="pnThrobber" />
                    
                    <asp:Panel runat="server" ID="pnThrobber">
                        <cc:WaitImage ID="WaitImage1" runat="server" Size="Size16" />
                            请稍等...
                    </asp:Panel>
                </div> 
                <div class="actionarea" id="editbuttonbox">
                    <span class="button" id="modifyimageselectionbutton">再次编辑</span>
                    <asp:LinkButton ID="btnModifyAvatar" runat="server" Text="修改头像" CssClass="submitbutton" />
                </div>
            </div>
        </div>
        <div title="hiddens">
            <asp:HiddenField ID="hdnSelection" runat="server" />
        </div>
        <%-- <asp:UpdatePanel ID="UpdatePanel1" runat="server" ChildrenAsTriggers="true" UpdateMode="Always">
            <ContentTemplate>
                <asp:Panel ID="AvatarPanel" runat="server" CssClass="avatareditpanel">
                    <div class="editbox left">
                        <asp:Image ID="uploadedAvatarImage" runat="server" CssClass="tempavatarimage" />
                    </div>
                    <div class="previewbox left">
                        <img alt="预览" id="previewimg" />
                    </div>
                </asp:Panel>
                <ajaxctrltool:ModalPopupExtender ID="AvatarModal" runat="server" PopupControlID="AvatarPanel"
                    BackgroundCssClass="modalBackground" TargetControlID="AvatarPanel" BehaviorID="AvatarModal"
                     RepositionMode="RepositionOnWindowScroll" X="0" Y="0">
                </ajaxctrltool:ModalPopupExtender>
            </ContentTemplate>
        </asp:UpdatePanel>--%>
    </div>
    <div id="imageselectdialog" title="修改头像">
        <div class="ctn-p-b">
            <table class="tb-auto">
                <tr>
                    <th>
                        调整图片
                    </th>
                    <th>
                        头像预览
                    </th>
                </tr>
                <tr>
                    <td valign="top">
                        <img id="avatar-image-select" alt="" src="" />
                    </td>
                    <td valign="top">
                        <div class="previewbox">
                            <img alt="" class="previewimg" src="" /></div>
                    </td>
                </tr>
            </table>
        </div>
        <div class="actionarea textfar">
            <a id="closepreviewdialogbutton" class="submitbutton pointer">确定</a>
        </div>
    </div>
</asp:Content>
